//##########################################################################
//#                                                                        #
//#                                PYCC                                    #
//#                                                                        #
//#  This program is free software; you can redistribute it and/or modify  #
//#  it under the terms of the GNU Library General Public License as       #
//#  published by the Free Software Foundation; version 2 or later of the  #
//#  License.                                                              #
//#                                                                        #
//#  This program is distributed in the hope that it will be useful,       #
//#  but WITHOUT ANY WARRANTY; without even the implied warranty of        #
//#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the          #
//#  GNU General Public License for more details.                          #
//#                                                                        #
//#          Copyright 2020 Paul RASCLE www.openfields.fr                  #
//#                                                                        #
//##########################################################################

#ifndef CLOUDCOMPY_PYAPI_CCNUMPYINCLUDES_H_
#define CLOUDCOMPY_PYAPI_CCNUMPYINCLUDES_H_

// See Numpy documentation for PY_ARRAY_UNIQUE_SYMBOL and NO_IMPORT_ARRAY
// Numpy initialisation can be done once in a Python module constituted of several c source files
// Here, these source files are generated by sip.
// One source per module, plus one per class or type described in sip
// The Numpy C-API is held by the symbol defined by PY_ARRAY_UNIQUE_SYMBOL and shared between all the sources of the module
// One source should define the PY_ARRAY_UNIQUE_SYMBOL, all the other sources should reference it (extern) with NO_IMPORT_ARRAY
// So, this include is for all TypeHeaderCode in sip files, except the only TypeHeaderCode dedicated to the PY_ARRAY_UNIQUE_SYMBOL definition.

#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#define NO_IMPORT_ARRAY
#define PY_ARRAY_UNIQUE_SYMBOL PYCC_ARRAY_API
#include <numpy/arrayobject.h>

#endif /* CLOUDCOMPY_PYAPI_CCNUMPYINCLUDES_H_ */
